/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */

.breakpoint-panel-wrapper {
  max-width: 500px;
  min-width: 300px;
}

.breakpoint-panel-wrapper > :first-child {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.breakpoint-panel-wrapper > :last-child {
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.breakpoint-panel {
  background: var(--theme-toolbar-background);
  border: 1px solid var(--theme-splitter-color);
  color: var(--theme-toolbar-color);
  display: flex;
  flex-direction: column;
  position: relative;
}

.breakpoint-panel .button-container {
  padding: 8px;
}

.breakpoint-panel button {
  border-radius: 4px;
  align-self: center;
  line-height: 16px;
}

.breakpoint-panel .paused-add-comment {
  background-color: var(--secondary-accent);
}

.breakpoint-panel .action {
  color: var(--primaryAccent);
  text-decoration: underline;
  cursor: pointer;
}

.breakpoint-panel .summary {
  border-bottom: 1px solid var(--theme-splitter-color);
  color: var(--grey-50);
  display: flex;
  justify-content: space-between;
}

.breakpoint-panel .statements-container {
  overflow: hidden;
  text-overflow: ellipsis;
}

.breakpoint-panel .statement {
  align-items: center;
  display: flex;
  height: 28px;
  line-height: 16px;
  padding: 4px;
  padding-left: 8px;
  white-space: nowrap;
}

.breakpoint-panel .statement:first-child {
  padding-top: 8px;
}

.breakpoint-panel .statement:last-child {
  padding-bottom: 8px;
}

.breakpoint-panel .panel-editor {
  border-bottom: 1px solid var(--theme-splitter-color);
}

.breakpoint-panel .panel-editor form .CodeMirror {
  border-radius: 4px;
  border: 1px solid transparent;
  color: var(--theme-toolbar-color);
  display: flex;
  font-family: var(--monospace-font-family);
  font-size: var(--theme-code-font-size);
  width: 100%;
}

.breakpoint-panel .panel-editor.conditional form .CodeMirror {
  border: 1px solid #e5e7eb;
  height: 21px;
}

.breakpoint-panel form .form-row {
  align-items: center;
  height: 28px;
  display: flex;
}

.breakpoint-panel .panel-editor form .form-row.invalid .CodeMirror {
  border-color: var(--red-50);
}

.breakpoint-panel form textarea {
  width: 100%;
  height: 26px;
  resize: none;
  border-radius: 4px;
}

.breakpoint-panel .CodeMirror-scroll {
  display: flex;
  flex-grow: 1;
}

/* This removes padding so we can match the positions of both editing and
non-editing markup */
.breakpoint-panel .CodeMirror .CodeMirror-line {
  padding: 0px;
}

.breakpoint-panel button.save:hover {
  background: var(--primary-accent-hover);
  color: white;
}

/* Breakpoint Navigation */

.breakpoint-panel .breakpoint-navigation {
  padding: 6px;
}

.breakpoint-panel .breakpoint-navigation-commands .img {
  background: var(--theme-comment);
}

.breakpoint-panel .breakpoint-navigation-commands .disabled .img {
  background: var(--theme-splitter-color);
}

.breakpoint-panel .breakpoint-navigation-commands button:not(.disabled):hover {
  background-color: var(--theme-toolbar-background-hover);
}

.breakpoint-panel .add-comment-icon {
  font-size: 1rem;
}

.breakpoint-panel .summary .statement:hover .expression {
  background-image: linear-gradient(to right, var(--theme-highlight-purple) 50%, transparent 0%);
  background-position: 1px 14px;
  background-size: 5px 1.5px;
  background-repeat: repeat-x;
}

.breakpoint-panel .summary.enabled:hover {
  background: hsl(240, 8%, 99%);
}

.breakpoint-panel .summary .statement:hover {
  cursor: pointer;
}

.breakpoint-panel .summary .statement:hover .pencil {
  opacity: 1;
  color: var(--theme-highlight-purple);
}
